package com.cy.pj.sys.service.aspect;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

@Aspect
@Component
public class SysCacheAspect {
    @Pointcut("@annotation(com.cy.pj.sys.service.aspect.RequiredCache)")
    public void doCache() {
    }

    @Around("doCache()")
    public Object around(ProceedingJoinPoint jp)
            throws Throwable {
        System.out.println("heloo");
        Object obj = jp.proceed();
        return obj;
    }

    @Pointcut("@annotation(com.cy.pj.sys.service.aspect.ClearCache)")
    public void doClearCache() {

    }
}
